package cn.tqfeiyang.springplus.framework.validation;

import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import java.util.Objects;

public class EntityIdValidator implements ConstraintValidator<EntityId, Long> {

    @Override
    public boolean isValid(Long value, ConstraintValidatorContext context) {
        if (Objects.nonNull(value) && value > 0) {
            return true;
        }
        return false;
    }
}
